unit aboutwindow;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, TabNotBk;

type
  TAboutForm = class(TForm)
    Label1: TLabel;
    Button1: TButton;
    dGCversion: TLabel;
    TabbedNotebook1: TTabbedNotebook;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    osname: TLabel;
    ossp: TLabel;
    ostype: TLabel;
    osversion: TLabel;
    Memo2: TMemo;
    Label6: TLabel;
    Memo1: TMemo;
    Label8: TLabel;
    Memo3: TMemo;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  AboutForm: TAboutForm;

  Version: TOSVersionInfo;
  lbRetVal: Boolean;
  Result:boolean;
  convert : variant ;
  OS : string;
  readrosver : integer;
  winver : string;
  temp : string;



implementation

{$R *.dfm}

procedure TAboutForm.Button1Click(Sender: TObject);
begin
aboutform.Close;
end;

procedure TAboutForm.FormCreate(Sender: TObject);
begin
dGCversion.Caption := '0.0.0.0';

{ code from windetnew.rar }

 { prepare }
  Version.dwOSVersionInfoSize := SizeOf(Version);
  lbRetVal := GetVersionEx(Version);

  { windows type detection }
  if (Version.dwPlatformId = 0) then ostype.Caption:='Windows 3.1x + Win32S';
  if (Version.dwPlatformId = 1) then ostype.Caption:='Windows 9x';
  if (Version.dwPlatformId = 2) then ostype.Caption:='Windows NT';


    convert:=  version.dwMajorVersion;
    temp := convert;
    osversion.Caption:= temp + '.';
    convert:=  version.dwMinorVersion;
    temp := convert;
    osversion.Caption:= osversion.Caption + temp + '.';
    convert:= version.dwBuildNumber;
    temp := convert;
    osversion.Caption:= osversion.Caption + temp ;

    if (Version.dwPlatformId = 1) and (version.dwMajorVersion = 4) and (version.dwMinorVersion = 0) then
    osname.Caption := 'Windows 95';
    if (Version.dwPlatformId = 1) and (version.dwMajorVersion = 4) and (version.dwMinorVersion = 10) then
    osname.Caption := 'Windows 98';
    if (Version.dwPlatformId = 1) and (version.dwMajorVersion = 4) and (version.dwMinorVersion = 95) then
    osname.Caption := 'Windows ME';
    if (Version.dwPlatformId = 2) and (version.dwMajorVersion = 4) and (version.dwMinorVersion = 0) then
    osname.Caption := 'Windows NT 4.0';
    if (Version.dwPlatformId = 2) and (version.dwMajorVersion = 5) and (version.dwMinorVersion = 0) then
    osname.Caption := 'Windows 2000';
    if (Version.dwPlatformId = 2) and (version.dwMajorVersion = 5) and (version.dwMinorVersion = 1) then
    osname.Caption := 'Windows XP';
    if (Version.dwPlatformId = 2) and (version.dwMajorVersion = 5) and (version.dwMinorVersion = 2) then
    osname.Caption := 'Windows 2003';
    if (Version.dwPlatformId = 2) and (version.dwMajorVersion = 6) and (version.dwMinorVersion = 0) then
    osname.Caption := 'Windows Vista';

    ossp.Caption :=  Version.szCSDVersion;




     readrosver := 15  ;
     repeat
     OS := OS + version.szCSDVersion[readrosver];
     readrosver := readrosver + 1;
     until readrosver = 22  ;

     IF OS = 'ReactOS' then begin
     osname.caption := 'ReactOS';
     osversion.caption := '';
     readrosver := 23  ;
     repeat
     osversion.caption := osversion.caption + version.szCSDVersion[readrosver];
     readrosver := readrosver + 1;
     ossp.caption := '';


     until readrosver = 127  ;
     end;
end;

end.
